<template>
  <div class="feature-header">
    <div class="feature-logo">
      <img v-if="img" :src="img" />
      <i v-else :class="icon"></i>
    </div>
    <span class="feature-title">{{ title }}</span>
  </div>
</template>

<script>
export default {
  name: 'FeatureHeader',
  props: {
    icon: {
      type: String,
      default: ''
    },
    img: {
      type: String,
      default: ''
    },
    title: {
      type: String,
      required: true
    }
  }
}
</script>

<style scoped>
.feature-header {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.feature-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f3f6fa;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
}
.feature-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.feature-logo i {
  font-size: 32px;
  color: #409EFF;
}
.feature-title {
  font-size: 26px;
  font-weight: bold;
  color: #222;
  letter-spacing: 2px;
}
</style> 